feat: modernize Python project - #719
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
PR Code Suggestions ✨Latest suggestions up to 1ef9514
Previous suggestionsSuggestions up to commit 5ec4235
|
5ec4235 to
d69e73f
Compare
294bc34 to
10d184e
Compare
2aaa38e to
1cbfad2
Compare
1cbfad2 to
1ef9514
Compare
|
Persistent review updated to latest commit 1ef9514 |
1ef9514 to
2203bf3
Compare
2203bf3 to
c1b7f61
Compare
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
…es (#733) This commit fixes critical bugs in the Python 3 modernization that were causing GitHub Actions workflow failures in the "Test McBopomofo" step. Fixes in score_validator.py: - Add missing 'phrases' parameter to 20+ seg_pick() calls (lines 155, 166, 168, 175, 198, 214, 229, 240, 242, 249, 273, 290, 306, 321, 332, 334, 341) - Add missing 'phrases' parameter to three_char_walk() calls (lines 216, 292, 308) - Fix incorrect walker function call: four_char_walk -> five_char_walk (line 275) - Optimize control flow by converting multiple if statements to elif chain in check_bpmf_output() function to prevent redundant execution Fixes in phrase_deriver.py: - Remove zip(strict=True) for Python 3.9+ compatibility (strict parameter requires Python 3.10+) - Length validation already performed before zip, so strict mode redundant All fixes verified with: - Syntax validation (py_compile) - Full data build (make all) - Data integrity checks (make check) - Score validator execution These changes resolve the TypeErrors that were preventing the workflow from completing successfully. Co-authored-by: Claude <noreply@anthropic.com>
|
Claude Code Review Failed The automated Claude review encountered an error and could not complete. You can:
This does not affect the PR approval process. |
User description
Modernizes Python codebase to 3.12+ with type hints and clean architecture.
PR Type
Enhancement, Documentation
Description
Migrate data tools to Python 3.12+
Add typing, refactors, better I/O handling
New encoding audit CLI utility
Improve CLIs, errors, and Unicode safety
Diagram Walkthrough
File Walkthrough
12 files
Py3 refactor with typing and safer I/ODecompose compiler, add loaders and typingModular analysis with functions and CLI mainRegex builder modernization and py3 printingTyped, modular frequency generation pipelineParallel counter with argparse and robust I/OSafer zipping, minor cleanup and typingAdd loaders, PROJECT_ROOT paths, safe mappingExtract loaders, skip pattern, f-stringsNew encoder audit CLI for BPMFBase.txtType hints and stable float formattingUpdate cache usage and DataFrame vars1 files
Require Python 3.12+, add ruff config and CLI2 files
Update docs for Python 3.12 and pathsRefresh data documentation and tooling notes31 files